package com.example.logindemo.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class LoginController {

    @PostMapping("/doLogin")
    public Map doLogin(String phone,String password){
        Map res = new HashMap();
        if ((phone.equals("lkq")&& password.equals("5201314"))){
            res.put("code",200);
            res.put("result","ok");
        }else {
            res.put("result","no");
        }
        return res;
    }
}
